package com.aj.http.request;

import java.util.HashMap;

import android.content.Context;
import android.util.Log;

import com.aj.databases.entry.User;
import com.aj.http.AsynchronizationHttpRequest;
import com.aj.http.AsynchronizationHttpRequest.IHttpCallBack;

public class UpdateUserInfoRequest extends BaseRequset {
	private static final String TAG = UpdateUserInfoRequest.class.getName();

	public void excute(Context context, User user, IHttpCallBack httpCallBack) {
		HashMap<String, String> paramsHashMap = new HashMap<String, String>();
		paramsHashMap.put("userId", user.getUser_id());
		paramsHashMap.put("userTel", user.getPhohe());
		paramsHashMap.put("nickName", user.getNickName());
		paramsHashMap.put("sex", user.getSex());
		paramsHashMap.put("birthday", user.getBirthday());
		paramsHashMap.put("address", user.getAddress());
		paramsHashMap.put("sign", user.getSign());
		paramsHashMap.put("photo", user.getPortrait_url());
		paramsHashMap.put("trueName", user.getName());
		String tempString = getParams(SERVICE_UPDATE_USERINFO_STRING,
				paramsHashMap);
		Log.e(TAG, "tempString:" + tempString);
		// TODO加密
		AsynchronizationHttpRequest request = new AsynchronizationHttpRequest();
		request.excute(context, BASE_REQUEST_URL_NOPAGE_STRING, tempString,
				httpCallBack);
	}
}
